|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectalgalcommand.io.SimpleTime
public class SimpleTime
| Constructor Summary | |
|---|---|
SimpleTime()
|
|
SimpleTime(java.util.Calendar time)
Creates an object from a calendar object |
|
SimpleTime(java.util.Date time)
Creates an object from a date object |
|
SimpleTime(java.lang.String timestring)
Creates an object frmo a time string |
|
| Method Summary | |
|---|---|
static SimpleTime |
currentTime()
|
int |
getHours()
|
int |
getMinutes()
|
double |
getSeconds()
|
static void |
main(java.lang.String[] args)
|
static SimpleTime |
parseSimpleTime(java.lang.String time)
makes a SimpleTime object from a String representing time |
void |
setHours(int t)
Sets the hour time component |
void |
setMinutes(int t)
Sets the minute time component |
void |
setSeconds(double t)
Sets the second time component |
void |
setSeconds(int t)
Sets the second time component |
void |
setTime(java.util.Calendar caldate)
Sets the time from the given Calendar object. |
void |
setTime(java.util.Date date)
Sets the time from the given date object. |
void |
setTime(java.lang.String timestring)
|
double |
toDayFraction()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleTime()
public SimpleTime(java.lang.String timestring)
timestring - public SimpleTime(java.util.Date time)
time - public SimpleTime(java.util.Calendar time)
time - | Method Detail |
|---|
public static SimpleTime currentTime()
public void setTime(java.lang.String timestring)
timestring - A string representing time, such as 8:30 or 1:56:09.5pmpublic void setTime(java.util.Date date)
date - public void setTime(java.util.Calendar caldate)
caldate - public int getHours()
public int getMinutes()
public double getSeconds()
public void setHours(int t)
t - New valuepublic void setMinutes(int t)
t - New valuepublic void setSeconds(int t)
t - New valuepublic void setSeconds(double t)
t - New valuepublic java.lang.String toString()
toString in class java.lang.Objectpublic double toDayFraction()
public static SimpleTime parseSimpleTime(java.lang.String time)
throws java.lang.NumberFormatException
time -
java.lang.NumberFormatException - Thrown if there are any poorly formed numberspublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||